import service from '../utils/request'

// 登录接口
export function user_list(payload = {}) {
  return service.get("/login", { params: payload })
}
// 修改密码
export function user_list2(payload = {}) {
  return service.put("/login", { params: payload })
}
// 注册接口
export function user_register(payload = {}) {
  return service.post("/login", payload)
}


///添加咨询表单
export function Zixun_add(payload = {}) {
  return service.post("/Zixun", payload)
}
// 获取咨询表单
export function Zixun_list(payload = {}) {
  return service.get("/Zixun", payload)
}
//根据id查找咨询表单
export function Zixun_xiangqig(payload = {}) {
  return service.get("/Zixun/" + payload.id)
}
//删除咨询表单
export function Zixun_delete(payload = {}) {
  return service.delete("/Zixun/" + payload.id)
}
// 修改咨询表单状态
export function Zixun_update(payload = {}) {
  var { id, ...data } = payload
  return service.patch("/Zixun/" + payload.id, data)
}
// 模糊搜索
export function Zixun_search(payload = {}) {
  return service.get(`/Zixun?headline_like=${payload}`)
}

//添加投诉表单
export function Tousu_add(payload = {}) {
  return service.post("/Tousu", payload)
}
// 获取投诉表单
export function Tousu_list(payload = {}) {
  return service.get("/Tousu", payload)
}
//根据id查找投诉表单
export function Tousu_xiangqig(payload = {}) {
  return service.get("/Tousu/" + payload.id)
}

//删除投诉表单
export function Tousu_delete(payload = {}) {
  return service.delete("/Tousu/" + payload.id)
}
// 修改咨询表单状态
export function Tousu_update(payload = {}) {
  var { id, ...data } = payload
  return service.patch("/Tousu/" + payload.id, data)
}

// 模糊搜索
export function Tousu_search(payload = {}) {
  return service.get(`/Tousu?headline_like=${payload}`)
}